<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class SchoolExpenditure extends Validate
{
    protected $rule = ['expenditure_info' => 'require','expenditure_price' => 'require|number',
    ];

    protected $message = ['expenditure_info.require' => '支出项目为必填项','expenditure_price.require' => '支出金额为必填项','expenditure_price.number' => '支出金额需为数字',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['expenditure_info','expenditure_price',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['expenditure_info','expenditure_price',]);
    }
}
